#include <iostream>
#include <string>
using namespace std;

template <typename T>
// return a > b
bool larger(T a, T b)
{
    return a > b;
}

template <typename T>
void compareAndShow()
{
    T a, b;
    cin >> a >> b;
    if (larger(a, b))
    {
        cout << a << endl;
    }
    else
    {
        cout << b << endl;
    }
}

int main()
{
    while (true)
    {
        char flag;
        cin >> flag;

        switch (flag)
        {
        case 'i':
            compareAndShow<int>();
            break;

        case 'f':
            compareAndShow<float>();
            break;

        case 's':
            compareAndShow<string>();
            break;

        case 'e':
            return 0;

        default:
            break;
        }
    }
}